import {  Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
// mongDB模块
import { MongooseModule } from '@nestjs/mongoose';
// 依赖共享模块
import { SharedModule } from './shared.module';
// Config
import Config from '@/config'
const { hostname, hostport, dbName, dbUser, dbPassword} = Config;

import { AdminModule } from '@/app/admin/admin.module'

@Module({
  imports: [
    SharedModule,
    AdminModule,
    MongooseModule.forRoot(
      `mongodb://${hostname}:${hostport}/${dbName}`,
      // `mongodb+srv://quick:${dbPassword}@quick.gq6rh.mongodb.net/?retryWrites=true&w=majority&appName=${dbUser}`
    ),
  ],
  controllers: [AppController],
  providers: [AppService,
    
  ]
})
export class AppModule {

}
